package com.atguigu.ssyx.cart.service;


import com.atguigu.ssyx.model.order.CartInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 购物车表 服务类
 * </p>
 *
 * @author author
 * @since 2025-09-25
 */
public interface ICartInfoService  {

    void addToCart(Long skuId, Long userId, Integer skuNum);


    void deleteCart(Long skuId, Long userId);

    void deleteAllCart(Long userId);

    void batchDeleteCart(List<Long> skuIdList, Long userId);


    List<CartInfo> getCartListByUserId(Long userId);


    /**
     * 更新选中状态
     *
     * @param userId
     * @param isChecked
     * @param skuId
     */
    void checkCart(Long userId, Integer isChecked, Long skuId);

    void checkAllCart(Long userId, Integer isChecked);

    void batchCheckCart(List<Long> skuIdList, Long userId, Integer isChecked);

    List<CartInfo> getCartCheckedList(Long userId);
    //根据userId删除选中购物车记录
    void deleteCartChecked(Long userId);

}
